Introduction

SilverWare Windows Communications Tool Kit

On-line Product Information

SilverWare Inc.	Tele: (214) 247-0131

3010 LBJ Freeway, Suite 740	Fax:  (214) 406-9999

Dallas, TX  75234 (USA)	BBS:  (214) 247-2177

Providing Asynchronous Communications Solutions Since 1986.


Features

 Multi Language Support

 Reliable (NO WM_COMMNOTIFY)

 Intelligent High Level Dialog Functions

 File Transfers

 Examples For Every Language...

 Very Easy to use

 Device Independence (Beyond COM2)

 Extensive On-line Help

 Auto Dialer

 SmartModem Support

 Demo Programs

 No Royalties

 Free Technical Support

 Comprehensive Function Return Code System

 Timer Functions

 Low/High Level Control

 Professional Documentation

 Consistent Naming


Multi Language Support

The SilverWare Windows Communications Tool Kit comes fully documented with examples, prototypes and interface information for the following languages.

Support for:

 C / C++

 CA-Visual Objects

 Clarion for Windows

 Clip4Win

 dBASE for Windows

 Delphi

 FiveWin

 Paradox for Windows

 Power Builder

 Turbo Pascal for Windows

 Visual Basic

The library is a Microsoft Windows Dynamic Link Library (DLL) and is accessible from any Windows language or program that can make FAR PASCAL function calls and can pass 16 and 32 bit parameters by reference and value.


Reliable (NO WM_COMMNOTIFY)

WM_COMMNOTIFY seems a little unstable:

There are a few different methods to provide language extensions in the Windows environment.  Two of the most popular are VBX (Visual Basic Extension) and DLL (Dynamic Link Library).

Most vendors that use the VBX approach use the WM_COMMNOTIFY message.

First our experience with WM_COMMNOTIFY.

This method enables a Windows message to be posted into the Windows message queue when COM events occurs.  At first glance you would think that this is a good way to handle communications programming in the Windows environment.  As further testing showed, this method causes problem in that it bombards the message queue with COM event messages.  As a result, the communications link becomes unstable and event messages become lost.  When this occurs, communications under Windows become unstable.

How do we do it:

We created a DLL (Dynamic Link Library).

The SilverWare Windows Communications Tool Kit does NOT use the WM_COMMNOTIFY message.  We provide functions that you can call to retrieve information or check status on the serial port.

This may pose the question, How to I get notified when something happens on the COM port?  You can simply utilize a timer control from your native language.

The timer method allows you to gain control on a timed basis and when a COM condition of interest has occurred you can service this condition.   The timer method allows the control to be at the application level and you can decide how often a timer message is to be posted into the Windows message queue.  In addition you can use a single timer to control multiple COM ports in an application.

Of course you do not have to use a timer to read data from a serial ports.  You can use while loops,  object controls or any method that best suites your application design.

This overall approach using a DLL and timer controls results in the most reliable communications link in the Windows environment.


High Level Dialog Functions.
We do the work.

You make the call, we'll do the work!

The following high level dialog functions are designed to decrease your development time and create Windows common dialogs that can be invoked with just a single function call.  This will enable you to create complete user interfaces for all your standard communications settings.

Above each dialog is a single line of code calling the function that generated the dialog.

It's that easy!

intReturn = SWCDLGFileTransferOptionsDia(Form1.hWnd, "", intPort_ID, 0)

intReturn = SWCDLGAutoDialer(Form1.hWnd, "", intPort_ID, 0, strDialString, strConnectResponse, rlngLengthOfConnectString, 60, 4)

intReturn = SWCDLGClosePort(Form1.hWnd, "", 0)

intReturn = SWCDLGGetUARTSettings(Form1.hWnd, "", intPort_ID, 0)

intReturn = SWCDLGModemOptionsDialog(Form1.hWnd, "", intPort_ID, 0)

intPort_ID = SWCDLGOpenPort(Form1.hWnd, "", 0)

intReturn = SWCDLGSelectDirectory(Form1.hWnd, "", "\", strDirSelection, Len(strDirSelection), lngReturnLength)

intReturn = SWCDLGSelectFileName(Form1.hWnd, "", "\", strExtFilter, strFileSelection, Len(strFileSelection), lngReturnLength)

intPort_ID = SWCDLGSelectPort(Form1.hWnd, "", 0)

intReturn = SWCDLGSelectTransDirection(Form1.hWnd, "", -1, 0)

intReturn = SWCDLGSelectTransType(Form1.hWnd, "", -1, 0)


File Transfer Protocols

The SilverWare Windows Communications Tool Kit supports all the popular error correcting file transfer protocols to insure reliable, error free data transmission.

 XMODEM

 ZMODEM

 YMODEM (Batch)

 YMODEM-G (Batch)

 1K-XMODEM

 1K-XMODEM-G

 ASCII

These protocols are easy to use.  Just call the desired protocol passing the COM port, file spec and the parent window handle.

(i.e.)

intReturn = SWCTransmitZMODEM(intPort_ID, strFileSpec, Form1.hWnd)


Examples and Prototypes

The SilverWare Windows Communications Tool Kit comes with an example for every function in each language documented.

Click below to see language specific examples and function prototypes.

SWCT Function Examples

SWCT Function Prototypes


File Transfer Example
How easy is it to use?

Below is a simple Visual Basic program that opens the communications port, dials into an on-line system, uploads files, disconnects and closes the open COM port.

Now that's easy...

Sub Command1_Click ()

Dim intReturn As Integer

Dim intPort_ID As Integer

Dim strConnect As String

Dim rlngLenConnect As Long

intPort_ID = SWCDLGOpenPort(Form1.hWnd, "", 0)

If intPort_ID >= 0 Then ' Port opened

intReturn = SWCDLGGetUARTSettings(Form1.hWnd, "", intPort_ID, 0)

strConnect = Space(100) ' Variable to hold connect response string

rlngLenConnect = 0      ' Variable to hold length of strConnect

' Display the auto dialer dialog box

intReturn = SWCDLGAutoDialer(Form1.hWnd, "", intPort_ID, 0,

"247-2177", strConnect, rlngLenConnect, 60, 4)

' Send all .BAS  files via ZMODEM

intReturn = SWCTransmitZMODEM(intPort_ID, "*.BAS", Form1.hWnd)

' Putting Modem In Command State

intReturn = SWCSMEscape(-1)

intReturn = SWTWait(1000)         ' 1 second

' Hanging Up Phone and Close open COM port

intReturn = SWCSMHook(intPort_ID, "0")

intReturn = SWCCloseCom(intPort_ID, 0)

End If

End Sub


Device Independence (Beyond COM2)

One of the main features of Microsoft Windows as far as a developer is concerned is Device Independence.  A developer no longer needs to be concerned with the type of video display, printer or communication port(s) that are  connected to the PC.  If you need to access a multiple serial port device (such as a DigiBoard) the only requirement is that the vendor of the device must supply a windows device driver for their device.

The SilverWare Windows Communications Tool Kit makes all serial port requests through the published Microsoft Windows API.  The Windows API in turn maps the serial port requests to the currently installed Windows serial device driver.


SWCTransmitZMODEM() Function
On-line Help Example

SWCTransmitZMODEM() Function

See Also	Examples

Syntax

Visual Basic

SWCTransmitZMODEM(ByVal intPort_ID As Integer, ByVal strFileSpec As String, ByVal inthWnd As Integer) As Integer

C / C++

int FAR PASCAL SWCTransmitZMODEM(int Port_ID, LPSTR lpszFileSpec, HWND hWnd)

Additional Language Prototypes

Additional Language Prototypes

Port_ID

COM port ID that identifies an open device.  This ID is the return value from a successful call to SWCOpenCom().

FileSpec

Drive and path name for the file(s) to send.  FileSpec can contain wildcards such as *.*, *.txt, file?.dbf, etc...

hWnd

Handle of the parent window.

Returns

SWCSUCCESSFUL	0

SWCTIMEDOUT	-492

SWCABORT	-491

SWCNOCARRIER	-489

SWCUNABLETOOPENFILE	-488

SWCBADBLOCKCHECK	-487

SWCNOREMOTERESPONSE	-486

SWCLOCALABORT	-485

SWCREMOTEABORT	-484

SWCZMBADHEXDIGIT	-467

SWCZMBADESCAPE	-466

SWCZMGARBLEDPACKET	-465

Description

Transmits file(s) via ZMODEM.

To enable the crash recovery feature of ZMODEM, you must call SWCZMSetResume() using a 1 to enable crash recovery.  By default crash recovery is set off.  Crash recovery is accomplished by re-transmitting the same file to the same destination and path.  The previous received portion of the file must not be modified before recovery.  Also, you can not change the time or date stamps of the files on the sending or receiving machine before attempting crash recovery.

Note

When using ZMODEM it is recommended to have a transmit and receive buffer of at least 4K.  These are set with the SWCOpenCom() function.

You may need to enable RTS/CTS flow control before using this function. See: SWCSetRTSCTSFlowControl().

Important

If you are using a timer control to remove or transmit data for a specific port in the background, you must disable the timer for that port before starting a file transfer.  After the file transfer is complete you can enable the timer for that port.

File transfer protocols are modeless dialogs and the timer control can interrupt the flow of data during the transfer and remove (steal) file transfer data from the transfer protocol.


Additional Language Prototypes

CA-Visual Objects

Clarion for Windows

dBASE for Windows

Delphi / Turbo Pascal for Windows

FiveWin / Clip4Win

Paradox for Windows

PowerBuilder


dBASE for Windows

(CINT) SWCTransmitZMODEM(nPort_ID, cFileSpec, nhWnd)


FiveWin / Clip4Win

SWCTZMOD(nPort_ID, cFileSpec, nhWnd) -> nInt


CA-Visual Objects

_DLL FUNC SWCTransmitZMODEM(siPort_ID AS SHORTINT, lpszFilePath AS PSZ, whWnd AS WORD) AS SHORTINT PASCAL:SWCT500.SWCTransmitZMODEM


Clarion For Windows

SWCTransmitZMODEM(SHORT, *CSTRING, SHORT), SHORT, PASCAL, RAW


PowerBuilder

FUNCTION INT SWCTransmitZMODEM(INT intPort_ID, STRING strFilePath, UINT uinthWnd) LIBRARY "SWCT500.DLL"


Delphi Turbo Pascal for Windows

function SWCTransmitZMODEM(Port_ID: Integer; PCharFilePath: PChar; Wnd: Hwnd): Integer; external 'SWCT500';


Paradox for Windows

SWCTransmitZMODEM (wPort_ID CWORD, strFileSpec CPTR, whWnd CWORD) CWORD


See Also

SWCDLGFileTransferOptionsDia() Function

SWCDLGSelectFileName() Function

SWCDLGSelectTransDirection() Function

SWCDLGSelectTransType() Function

SWCReceiveZMODEM() Function

SWCTransmitASCII() Function

SWCTransmitXMODEM() Function

SWCTransmitXMODEM1K() Function

SWCTransmitXMODEM1KG() Function

SWCTransmitYMODEM() Function

SWCTransmitYMODEMBatch() Function

SWCTransmitYMODEMGBatch() Function

SWCXYMSetCheckType() Function

SWCXYZMSetCDMonitoring() Function

SWCXYZMSetMaxRetries() Function

SWCXYZMSetProgressBox() Function

SWCXYZMSetProgressBoxDelay() Function

SWCZMSetCRC32() Function

SWCZMSetResume() Function

SWCZMSetRxBufferLength() Function

SWCZMSetRxCharTimeout() Function


Examples

C / C++

CA-Visual Objects

Clarion For Windows

dBASE for Windows

Delphi / Turbo Pascal for Windows

FiveWin / Clip4Win

Paradox for Windows

PowerBuilder

Visual Basic


SWCTransmitZMODEM()

Copy Example	Print Example

To try this example, add \SWCT500\VB\INCLUDE\SWCTFUNC.BAS to your project then paste the code into the Declarations section of a form.  Then press F5 and click the form.

Sub Form_Click ()

' Disable form to stop multiple instances

Form1.Enabled = False

Dim intPort_ID As Integer   ' ID for the open port

Dim intPort As Integer      ' COM port to open

Dim strBuffer As String     ' Buffer to hold text return code

Dim intReturn As Integer    ' Integer return variable

Dim lngBaud As Long         ' Baud rate variable

Dim strFileSpec As String   ' File spec for transfer

intPort = 0                 ' 0 = COM1

lngBaud = 2400              ' 2400 BPS

strFileSpec = "C:\*.TMP"    ' File to up load

' Open COM1

intPort_ID = SWCOpenCom(intPort, 4000, 4000, 0)

Print "Return From SWCOpenCom() =", intPort_ID

If intPort_ID >= 0 Then   ' Port opened

' Set Baud, Parity, DataBits, StopBits to 2400/N/8/1

intReturn = SWCSetUART(intPort_ID, lngBaud, 0, 8, 1)

Print "Return From SWCSetUART() =", intReturn

MsgBox ("Choose OK To Start SWCTransmitZMODEM()")

' Start file transfer

intReturn = SWCTransmitZMODEM(intPort_ID, strFileSpec, Form1.hWnd)

Print "Return From SWCTransmitZMODEM() =", intReturn

' Assign spaces to strBuffer to hold return text message

strBuffer = Space(255)

intReturn = SWCErrorToText(intReturn, 0, strBuffer)

Print "Text message = ", Mid(strBuffer, 1, intReturn)

' Close COM1

intReturn = SWCCloseCom(intPort_ID, 0)

Print "Return From SWCCloseCom() =", intReturn

End If

Form1.Enabled = True

End Sub


SWCTransmitZMODEM()

Copy Example	Print Example

// This example opens COM1, if successful it then calls the:

// SWCTransmitZMODEM() function and transmits the file named: \SWRX.TMP

if((PortId=SWCOpenCom(COM1,4000,2000,0))<0)

// Display MessageBox() to explain why there was

// an error opening the port.

SWCErrorToText(PortId,0,ErrorMessage);

MessageBox(hWnd,ErrorMessage,"Error Opening Port",MB_OK);

 else

// Port opened successfully.  Set Baud Rate, Parity etc.

SWCSetUART(PortId,2400,SWPARITYNONE,8,1);

MessageBox(hWnd,"Select OK to Start SWCTransmitZMODEM()","",MB_OK);

ReturnCode=SWCTransmitZMODEM(PortId,"\\SWRX.TMP",hWnd);

SWCErrorToText(ReturnCode,0,ErrorMessage);

MessageBox(hWnd,ErrorMessage,"Return From Transfer",MB_OK);

// Close port when finished.

SWCCloseCom(PortId,0);


SWCTransmitZMODEM()

Copy Example	Print Example

To try this example, add \SWCT500\DELPHI\INCLUDE\SWCTFUNC.PAS to your project then paste the code into the procedure TForm1.Button1Click().  Then press F9 and click Button1.

var

Port_ID : Integer;                      { ID for the open port }

Port : Integer;                         { COM port to open }

PCharBuffer : array[0..200] of Char;    { Buffer to hold text return code }

Return : Integer;                       { Integer return variable }

lBaud : LongInt;                        { Baud rate variable }

PCharFileSpec : array[0..200] of Char;  { File spec for transfer }

begin

{ Disable form to stop multiple instances }

Form1.Enabled := False;

Port := 0;                            { 0 := COM1 }

lBaud := 2400;                        { 2400 BPS }

StrCopy(PCharFileSpec, '\SWTX.TMP');  { File to down load }

{ Open COM1 }

Port_ID := SWCOpenCom(Port, 4000, 4000, 0);

MessageDlg('Return From SWCOpenCom() = ' + IntToStr(Port_ID), mtCustom, [mbOk], 0);

if Port_ID >= 0 then   { Port opened }

begin

{ Set Baud, Parity, DataBits, StopBits to 2400/N/8/1 }

Return := SWCSetUART(Port_ID, lBaud, 0, 8, 1);

MessageDlg('Return From SWCSetUART() = ' + IntToStr(Return), mtCustom, [mbOk], 0);

MessageDlg('Choose OK To Start SWCTransmitZMODEM()', mtCustom, [mbOk], 0);

{ Start file transfer }

Return := SWCTransmitZMODEM(Port_ID, PCharFileSpec, Form1.Handle);

MessageDlg('Return From SWCTransmitZMODEM() = ' + IntToStr(Return), mtCustom, [mbOk], 0);

{ Assign spaces to PCharBuffer to hold return text message }

Return := SWCErrorToText(Return, 0, PCharBuffer);

MessageDlg('Text message = ' + StrPas(PCharBuffer), mtCustom, [mbOk], 0);

{ Close COM1 }

Return := SWCCloseCom(Port_ID, 0);

MessageDlg('Return From SWCCloseCom() = ' + IntToStr(Return), mtCustom, [mbOk], 0);

end;

Form1.Enabled := True;

end;


SWCTransmitZMODEM()

Copy Example	Print Example

* This example is designed to be ran from a Form.

* First create a PUSHBUTTON1 pushbutton, then copy the code

* to the PUSHBUTTON1_OnClick event procedure.

* (ie. Procedure PUSHBUTTON1_OnClick)

* To run the example click PUSHBUTTON1.

* Library function prototype file

#include "\SWCT500\DBWIN\INCLUDE\SWCTFUNC.H"

SET TALK OFF

PRIVATE nPort, nPort_ID, nRXQSize, nTXQSize, nBaudRate, cBuffer, cFileSpec

* Disable PUSHBUTTON1 to stop multiple instances

Form.PUSHBUTTON1.Enabled = .F.

nPort        = 0                && COM1

nPort_ID     = 0

nRXQSize     = 4000

nTXQSize     = nRXQSize

nBaudRate    = 2400

nReturnCode  = 0

cBuffer      = SPACE(256)

* You should copy any file to \SWTX.TMP to run this example

cFileSpec    = "\SWTX.TMP"      && File to up load

nPort_ID = SWCOpenCom(nPort, nRXQSize, nTXQSize, 0)

IF nPort_ID >= 0                && COM port open successful

?"SWCOpenCom()", nPort_ID

?SWCSetUart(nPort_ID, nBaudRate, 0, 8, 1)

MsgBox("Choose OK To Start SWCTransmitZMODEM()")

* Start file transfer

nReturnCode = SWCTransmitZMODEM(nPort_ID, cFileSpec, Form.hWnd)

* Assign spaces to cBuffer to hold return text message

nReturnCode = SWCErrorToText(nReturnCode, 0, cBuffer)

MsgBox("Text message = " + cBuffer)

?"SWCCloseCom()", SWCCloseCom(nPort_ID, 0)

ENDIF

* Enable PUSHBUTTON1

Form.PUSHBUTTON1.Enabled = .T.

* Remove the library from memory

RELEASE DLL SWCT500.DLL

RETURN


SWCTransmitZMODEM() [image] SWCTZMOD()

Copy Example	Print Example

To try this example, create a program that #INCLUDE(s) "SWCTDEF.CH"

and loads the library with hSWCTDLL := LoadLibrary("SWCT500.DLL").

Make sure that the variable hWnd is assigned with the parent

window handle and is available to the example. FreeLibrary(hSWCTDLL)

when completed.

LOCAL nPort, nPort_ID, nRXQSize, nTXQSize, nBaudRate

LOCAL nReturn, cBuffer, cFileSpec

nPort        := 0                && COM1

nPort_ID     := 0

nRXQSize     := 4000

nTXQSize     := nRXQSize

nBaudRate    := 2400

nReturn      := 0

cBuffer      := SPACE(256)

* You should copy any file to \SWTX.TMP to run this example

cFileSpec    := "\SWTX.TMP"       && File to up load

nPort_ID := SWC_OpenCom(nPort, nRXQSize, nTXQSize, 0)

IF nPort_ID >= 0                  && COM port open successful

?"SWC_OpenCom()", nPort_ID

?SWC_SetUart(nPort_ID, nBaudRate, 0, 8, 1)

?"Choose OK To Start SWCTZMOD()"

* Start file transfer

nReturn := SWCTZMOD(nPort_ID, cFileSpec, hWnd)

* Assign spaces to cBuffer to hold return text message

nReturn := SWCErrorToText(nReturn, 0, cBuffer)

?"Text message = " + cBuffer

?"SWCCloseCom()", SWCCloseCom(nPort_ID, 0)

ENDIF


SWCTransmitZMODEM()

Copy Example	Print Example

To try this example, in your Declare Global External Functions, choose the Paste From... command button and Paste Function Prototypes from \SWCT500\PB\INCLUDE\SWCTFUNC.PBF to your window. Then paste the example source to a command button (ie. cb_1) SCRIPT for the clicked Event.

// Disable command button to stop multiple instances

cb_1.Enabled = FALSE

INT intPort_ID       // ID for the open port

INT intPort          // COM port to open

STRING strBuffer     // Buffer to hold text return code

INT intReturn        // Integer return variable

LONG lngBaud         // Baud rate variable

STRING strFileSpec   // File spec for transfer

UINT uinthWnd        // Parent window handle

// Get parent window handle

uinthWnd = Handle(Parent)

intPort = 0                 // 0 = COM1

lngBaud = 2400              // 2400 BPS

strFileSpec = "\SWTX.TMP"   // File to up load

// Open COM1

intPort_ID = SWCOpenCom(intPort, 4000, 4000, 0)

MessageBox("Message", "Return From SWCOpenCom() = " + STRING(intPort_ID))

If intPort_ID >= 0 Then   // Port opened

// Set Baud, Parity, DataBits, StopBits to 2400/N/8/1

intReturn = SWCSetUART(intPort_ID, lngBaud, 0, 8, 1)

MessageBox("Message", "Return From SWCSetUART() = " + STRING(intReturn))

MessageBox("Message", "Choose OK To Start SWCTransmitZMODEM()")

// Start file transfer

intReturn = SWCTransmitZMODEM(intPort_ID, strFileSpec, uinthWnd)

MessageBox("Message", "Return From SWCTransmitZMODEM() = " + STRING(intReturn))

// Assign spaces to strBuffer to hold return text message

strBuffer = Space(255)

intReturn = SWCErrorToText(intReturn, 0, strBuffer)

MessageBox("Message", "Text message = " + strBuffer)

// Close COM1

intReturn = SWCCloseCom(intPort_ID, 0)

MessageBox("Message", "Return From SWCCloseCom() = " + STRING(intReturn))

End If

cb_1.Enabled = TRUE


SWCTransmitZMODEM()

Copy Example	Print Example

FUNCTION DemoSWCTransmitZMODEM(whWnd AS WORD)

LOCAL siPort_ID AS SHORTINT	// ID for the open port

LOCAL siPort AS SHORTINT	// COM port to open

LOCAL strBuffer AS STRING	// Buffer to hold text return code

LOCAL siReturn AS SHORTINT	// Int return variable

LOCAL liBaud AS LONGINT	// Baud rate variable

LOCAL liTimeOut AS LONGINT	// Time-out value after transfer

LOCAL strFileSpec AS STRING	// File spec for transfer

// You should copy any file to \SWTX.TMP to run this example

strFileSpec := "\SWTX.TMP"	// File to up load

siPort := 0	// 0 = COM1

liBaud := 2400	// 2400 BPS

liTimeOut := 10000	// 10 second time-out after transfer

// Open COM1

siPort_ID := SWCOpenCom(siPort, 4000, 4000, 0)

MsgBox(whWnd, "Return From SWCOpenCom() = " + STR(siPort_ID),"Message",0)

IF siPort_ID >= 0    // Port opened

// Set Baud, Parity, DataBits, StopBits to 2400/N/8/1

siReturn := SWCSetUART(siPort_ID, liBaud, 0, 8, 1)

MsgBox(whWnd, "Return From SWCSetUART() = " + STR(siReturn),"Message",0)

MsgBox(whWnd, "Choose OK To Start SWCTransmitZMODEM()","Message",0)

// Start file transfer

siReturn := SWCTransmitZMODEM(siPort_ID, strFileSpec, whWnd)

MsgBox(whWnd, "Return From SWCTransmitZMODEM() = " + STR(siReturn),"Message",0)

// Assign spaces to strBuffer to hold return text message

strBuffer := SPACE(255)

siReturn := SWCErrorToText(siReturn, 0, strBuffer)

MsgBox(whWnd, "Text message = " + strBuffer,"Message",0)

// Close COM1

siReturn := SWCCloseCom(siPort_ID, 0)

MsgBox(whWnd, "Return From SWCCloseCom() =" + STR(siReturn),"Message",0)

ENDIF

RETURN(0)


SWCTransmitZMODEM()

Copy Example	Print Example

! To test this example, 1st copy the example to your Embedded Source /

! Control Event Handling, after generated code  / Accepted / SOURCE for ?StartButton.

! Then define any loc:Variables used  by the example in your Data Section, Before Window

! Declaration. / SOURCE  section.

! Note: All possible loc:Variables are defined in the  EXTESTER programs

! Data Section, Before Window Declaration. / SOURCE  section.

! Disable controls to stop multiple instances and exit during test

disable(?StartButton)

disable(?mnuFileExit)

! Get parent window handle

loc:shWnd = windowprop:handle

loc:sPort        = 0                ! COM1

loc:sPort_ID     = 0

loc:lRXQSize     = 4000

loc:lTXQSize     = loc:lRXQSize

loc:lBaudRate    = 2400

loc:sReturn      = 0

loc:cBuffer      = ''

! You should copy any file to \SWTX.TMP to run this example

loc:cFileSpec    = '\*.TMP'      ! File to down load

loc:sPort_ID = SWCOpenCom(loc:sPort, loc:lRXQSize, loc:lTXQSize, 0)

IF loc:sPort_ID >= 0 THEN                ! COM port open successful

loc:sMsgReturn = Message('SWCOpenCom() ' & loc:sPort_ID, 'Message')

loc:sMsgReturn = Message(SWCSetUart(loc:sPort_ID, loc:lBaudRate, 0, 8, 1), 'Message')

loc:sMsgReturn = Message('Choose OK To Start SWCTransmitZMODEM()', 'Message')

! Start file transfer

loc:sReturn = SWCTransmitZMODEM(loc:sPort_ID, loc:cFileSpec, loc:shWnd)

loc:sReturn = SWCErrorToText(loc:sReturn, 0, loc:cBuffer)

loc:sMsgReturn = Message('Text message = ' & loc:cBuffer, 'Message')

loc:sMsgReturn = Message('SWCCloseCom() ' & SWCCloseCom(loc:sPort_ID, 0), 'Message')

END

! Enable controls

enable(?StartButton)

enable(?mnuFileExit)


SWCTransmitZMODEM()

Copy Example	Print Example

To try this example, first copy SWCTFUNC.TXT to your Form/Methods/Uses section.

Second add a push-button called #Button3 to your Form and copy the example source

to the #Button3/Methods/pushButton section. Then press F5 and click the Button.

method pushButton(var eventInfo Event)

var

siPort_ID SmallInt	; ID for the open port

siPort SmallInt	; COM port to open

strBuffer String	; Buffer to hold text return code

siReturn SmallInt	; Integer return variable

liBaud LongInt	; Baud rate variable

strFileSpec String	; File spec for transfer

endVar

; Disable pushbutton to stop multiple instances

#Button3.Visible = False

siPort = 0	; 0 = COM1

liBaud = 2400	; 2400 BPS

strFileSpec = "\\SWTX.TMP"	; File to up load

; Open COM1

siPort_ID = SWCOpenCom(siPort, 4000, 4000, 0)

msgInfo("Message", "Return From SWCOpenCom() = " + strVal(siPort_ID))

if siPort_ID >= 0 then   ; Port opened

; Set Baud, Parity, DataBits, StopBits to 2400/N/8/1

siReturn = SWCSetUART(siPort_ID, liBaud, 0, 8, 1)

msgInfo("Message", "Return From SWCSetUART() = " + strVal(siReturn))

msgInfo("Message", "Choose OK To Start SWCTransmitZMODEM()")

; Start file transfer

siReturn = SWCTransmitZMODEM(siPort_ID, strFileSpec, windowHandle())

msgInfo("Message", "Return From SWCTransmitZMODEM() = " + strVal(siReturn))

; Assign spaces to strBuffer to hold return text message

strBuffer = Space(255)

siReturn = SWCErrorToText(siReturn, 0, strBuffer)

msgInfo("Message", "Text message = " + strBuffer)

; Close COM1

siReturn = SWCCloseCom(siPort_ID, 0)

msgInfo("Message", "Return From SWCCloseCom() = " + strVal(siReturn))

endIf

#Button3.Visible = True

endmethod


Auto Dialer

intReturn = SWCDLGAutoDialer(Form1.hWnd, "", intPort_ID, 0, strDialString, strConnectResponse, rlngLengthOfConnectString, 60, 4)

Displays an auto dialer dialog box for dialing the modem.  The auto dialer will return SWCSUCCESSFUL if a CONNECT response is detected or SWCLOCALABORT if the Exit push button is pushed..  The modem specific CONNECT response will be received by the ConnectString variable.  This variable can be used to determine the baud rate connection.

SWCDLGAutoDialer() will auto redial if NO CARRIER or BUSY is returned by the modem.  The Abort push button will Hang up the modem.  The Exit push button will exit SWCDLGAutoDialer() without hanging up the modem.


Smart Modem Support (AT command set)

The SilverWare Windows Communications Tool Kit offers complete SmartModem control.  We supply a host of (SWCSM) SmartModem functions that makes modem control easy.  These (SWCSM) functions support the standard AT command set and will work with any AT command set modem.

In addition to the canned SmartModem functions, we supply the SWCSMTransmit() function that enable you to transmit your own custom modem setup strings.  This function has build in (Inter Byte Delay Pacing) to pace the speed in which characters are sent to a modem in command state.  This feature prevents AT command from being sent to the modem to fast avoiding modem overrun errors.

For reading modem responses, we provide the function SWCSMGetModemResponse().  This functions enables you to read modem response strings and set time-out values for the read.  It makes modem response handling easy.

See the Communications Function section for complete list of SmartModem functions.


SWCT Demos
Additional Items

The following shows additional items included with the SilverWare Windows Communications Tool Kit

Note:

Examples are provided for all documented languages however demos are NOT provided for all languages.

SilverWare Windows Communications Tool Kit program group.

Auto file transfer demo.

Communication port information demo.

Scripting language demo.

Terminal program demo.


No Royalties

The SilverWare Windows Communications Tool Kit is royalty free...

This means that if you create an application that you sell to 1 or 1001 different customers, you do not have to pay any additional fees to SilverWare Inc.

Our license agreement states that you are required own at least one copy of the SWCT library per programmer, NOT per program.


Technical Support

SilverWare Inc. offer complete technical support via. direct phone support or on our 24hr BBS.  You will speak to communications expert that is also a programmer.

The SilverWare Windows Communication Tool Kit also comes with a (FAQ) Frequently Asked Question on-line help file.  This help file has been created by our technical support staff that list the most commonly asked questions about our product and communications in general.  The help file will let you browse through the questions and click on the question to see the answer.


Function Return Codes

Throughout our documentation and The SilverWare Windows Communications Tool Kit we refer to the function return codes symbolically as defined in the constant file.  This section provides a description for each function return code.

Return	Value	Description

SWCSUCCESSFUL	0	Successful.

SWCINVALIDPARAMETER	-500	An invalid parameter was specified.

SWCQUEUEISFULL	-499	Attempted to insert a character to a full queue.

SWCQUEUEISEMPTY	-498	Attempted to remove a character from an empty queue.

SWCINVALIDPORT	-497	An invalid port was specified when opening the port.

SWCNOUARTPRESENT	-496	No UART present at specified I/O Address.

SWCNOMEMORY	-493	Insufficient memory.

SWCTIMEDOUT	-492	Timed out.

SWCABORT	-491	Function aborted.

SWCNOTFOUND	-490	Not Found.

SWCNOCARRIER	-489	Carrier detect not asserted.

SWCUNABLETOOPENFILE	-488	Unable to open specified file.

SWCBADBLOCKCHECK	-487	Bad block check (CRC/CHECKSUM).

SWCNOREMOTERESPONSE	-486	No response from remote.

SWCLOCALABORT	-485	Function aborted by local user.

SWCREMOTEABORT	-484	Function aborted by remote user.

SWCBADBLOCKNUMBE	-483	Block number is bad.

SWCBLOCKFRAMINGERROR	-482	Block framing error.

SWCRECEIVEQUEUETOOSMALL	-481	Receive buffer not big enough.

SWCEOTDETECTED	-480	EOT detect during file receive.

SWCMAXLENGTHREACHED	-479	Maximum length reached.

SWCTERMINATORREACHED	-478	Terminator reached.

SWCQUEUEWENTEMPTY	-477	Receive queue went empty during a function call that removes characters.

SWCFILEWRITEERROR	-475	Error writing file.

SWCFILECLOSEERROR	-474	Error closing file.

SWCFILEEXISTS	-473	File already exists.

SWCFILESEEKERROR	-472	Error seeking file.

SWCZMEXNEWER	-471	Existing file is newer.

SWCZMDATELENMATCH	-470	Date and length of file match.

SWCZMNEWFILESMALLER	-469	New file smaller than existing file.

SWCZMFILESKIPPED	-468	File does not exist and is skipped.

SWCZMBADHEXDIGIT	-467	Non lower case hex digit was detected.

SWCZMBADESCAPE	-466	Bad ZMODEM ESCAPE sequence detected.

SWCZMGARBLEDPACKET	-465	Receive packet garbled.

SWCZMSTARTUPDETECTED	-464	ZMODEM start sequence detected.

SWCILLEGALOPERATION	-463	Illegal operation performed.

SWCDIALOGCANCEL	-462	Cancel button chosen from a SilverWare dialog box.

SWCPORTINUSE	-461	COM port in use by another task.


Timer Functions

The SilverWare Windows Communications Tool Kit includes a host of useful timer functions.  These timer functions allow you to create and manipulate count down timers.

You can create, stop, pause, restart, check and destroy timers with simple function calls.

These timers are very useful when creating communications applications.  The SWCT timers allow you to perform all your time-out type routines without having to maintain complex coding.  All you have to do is create the timer and monitor the countdown.  We do the rest!


Low/High Level Control

The SilverWare Windows Communications Tool Kit gives you full control over your serial ports directly from your application.  You have the choice to use both low and high level functions to accomplish your task.

For example:

When setting your UART defaults you can simply call the high level dialog function SWCDLGGetUARTSettings() that prompts a user for the desired baud rate, parity, data bits and stop bits for the COM port.  For applications that may use a data file that contains the your desired setting, you can simply call the SWCSetUART() function to set your defaults.

You may also use both functions together.  Call the SWCSetUART() to set your defaults, then call the SWCDLGGetUARTSettings() to give the user the option to override these settings.


Professional Documentation

The SilverWare Windows Communications Tool Kit comes with both printed (hard copy) and on-line documentation.  This will enables you browse though our manual to become more familiar with the product or have instant on-line product information access during development.

The hard copy documentation shows C, Visual Basic and dBASE for Windows interfaces and all the other languages or documented in our on-line help.

On-line Documentation Example


Consistent Naming

In the SilverWare Windows Communications Tool Kit, all parameter, variable, structure, field and constant names conform to the Microsoft naming conventions.  The Microsoft naming conventions are a set of rules that define how to create names that indicate both purpose and data type of an item.  The conventions are used in this help file to help you readily identify the purpose and type of the function parameters and structure fields.  The conventions are also used in sample programs sources to make them more readable and informative.

We have also added a three character prefix to all of our function names.  This serves two purposes; first it decreases the possibility of a name collision with function names in other library products and secondly helps indicate which functional group the function belongs to.

The first two characters of our three character function name prefix is SW indicating SilverWare.  The third character of our function name prefix will indicate the type of function:

C = Communications

S = System

T = Timer

After the function name prefix will be the name of the function in the standard Verb / Noun naming convention.

(i.e.)

SWCTransmitString()

SW	: SilverWare function

C	: Type is communications

Transmit	: Verb

String	: Noun


Communications Functions

Dialog Box Functions

The functions in this group provide pre-written high level dialog functions for common communication programming.

SWCDLGAboutBox()	Displays the SWCT about dialog box.

SWCDLGAutoDialer()	Displays an auto dialer dialog box for dialing the modem.

SWCDLGClosePort()	Displays a dialog box with the option to close an open port.

SWCDLGFileTransferOptionsDia()	Displays a dialog box with the option to set file transfer protocol defaults.

SWCDLGGetUARTSettings()	Displays a dialog box for setting the UART settings.

SWCDLGModemOptionsDialog()	Displays a dialog box to set all the internal modem options.

SWCDLGOpenPort()	Displays a dialog box to open a communications port.

SWCDLGSelectDirectory()	Displays a standard Windows directory dialog box with the option to choose a drive and directory.

SWCDLGSelectFileName()	Displays a standard Windows file dialog box with the option to choose a drive.

SWCDLGSelectPort()	Displays a dialog box to select an open communications port.

SWCDLGSelectTransDirection()	Displays a dialog box for file transfer direction.

SWCDLGSelectTransType()	Displays a dialog box for file transfers protocols available.

File Transfer Functions

The functions in this group provide file transfer capabilities including XMODEM, 1K-XMODEM-G, YMODEM, YMODEM-G, YMODEM Batch, ZMODEM and ASCII.

SWCASCIISetExitCode()	Sets the termination character for SWCReceiveASCII().

SWCReceiveASCII()	Receive an ASCII file to disk.

SWCReceiveXMODEM()	Receive a file via XMODEM.

SWCReceiveXMODEM1K()	Receive a file via 1K-XMODEM.

SWCReceiveXMODEM1KG()	Receive a file via 1K-XMODEM-G.

SWCReceiveYMODEM()	Receive a file via YMODEM.

SWCReceiveYMODEMBatch()	Receive file(s) via YMODEM Batch.

SWCReceiveYMODEMGBatch()	Receive file(s) via YMODEM-G Batch.

SWCReceiveZMODEM()	Receive file(s) via ZMODEM.

SWCTransmitASCII()	Transmit an ASCII file.

SWCTransmitXMODEM()	Transmit a file via XMODEM.

SWCTransmitXMODEM1K()	Transmit a file via 1K-XMODEM.

SWCTransmitXMODEM1KG()	Transmit a file via 1K-XMODEM-G.

SWCTransmitYMODEM()	Transmit a file via YMODEM.

SWCTransmitYMODEMBatch()	Transmit file(s) via YMODEM Batch.

SWCTransmitYMODEMGBatch()	Transmit file(s) via YMODEM-G Batch.

SWCTransmitZMODEM()	Transmit file(s) via ZMODEM.

SWCXYMSetCheckType()	Control CHECKSUM/AUTO-FALLBACK on a X&Y MODEM receive protocols.

SWCXYZMSetCDMonitoring()	Set Carrier Detect monitoring for file transfer protocols.

SWCXYZMSetMaxRetries()	Set maximum retries for all file transfer protocols.

SWCXYZMSetProgressBox()	Set file transfer display status type.

SWCXYZMSetProgressBoxDelay()	Set the number of seconds that the file transfer box will remain on the screen after transfer.

SWCZMSetCRC32()	Enable/disable CRC-32 error checking for ZMODEM.

SWCZMSetResume()	Set resume download flag for ZMODEM.

SWCZMSetRxBufferLength()	Set the size of receive buffer transmitted for ZMODEM.

SWCZMSetRxCharTimeout()	Set the ZMODEM receive character time-out value.

Flow Control Enable / Disable / Status Functions

The functions in this group enable and disable the various types of flow control supported by the SilverWare Windows Communications Tool Kit.

SWCDCBSetCtsTimeout()	Specifies the maximum amount of time in milliseconds the device should wait for the CTS (clear-to-send) signal.

SWCDCBSetDsrTimeout()	Specifies the maximum amount of time in milliseconds the device should wait for the DSR (data-set-ready) signal.

SWCDCBSetRlsTimeout()	Specifies the maximum amount of time in milliseconds the device should wait for the RLSD (receive-line-signal-detect) signal.

SWCDCBSetXoffLim()	Specifies the maximum number of characters allowed in the receive queue before the XOFF character is sent.

SWCDCBSetXonLim()	Specifies the minimum number of characters allowed in the receive queue before the XON character is sent.

SWCGetFlowStatus()	Returns what flow controls are currently enabled.

SWCSetDTRDSRFlowControl()	Enables or disables DTR/DSR flow control.

SWCSetRTSCTSFlowControl()	Enables or disables RTS/CTS flow control.

SWCSetXOFFCharacter()	Change the current XOFF Character.

SWCSetXONCharacter()	Change the current XON Character.

SWCSetXONXOFFFlowControl()	Enables or disables XON/XOFF flow control.

Miscellaneous Communications Functions

This group includes functions to calculate a checksum and CRC of a buffer and a function to translate an error code to a text string.

SWCAsyncDate()	This function will provide detailed information about the version of the SilverWare Windows Communications Tool Kit.

SWCAsyncRev()	Get current library revision.

SWCAsyncVer()	Get current library version.

SWCCalculateChecksum()	Calculates CHECKSUM of a buffer.

SWCCalculateCRC()	Calculates CRC of a buffer.

SWCCalculateXOR()	Calculates XOR of a buffer.

SWCErrorToText()	Converts an error return value to a string.

SWCGetWinCommError()	Get Windows communications error.

Queue Status / Control Functions

This group includes functions to check the status of and flush the transmit and receive queues.

SWCFlushReceiveQueue()	Empties the receive queue.

SWCFlushTransmitQueue()	Empties the transmit queue.

SWCGetReceiveCount()	Returns number of characters in the receive queue.

SWCGetReceiveOverflow()	Tests for a receive queue overflow condition.

SWCGetReceiveQueueSpace()	Returns amount of free space in receive queue.

SWCGetTransmitCount()	Returns number of characters in the transmit queue.

SWCGetTransmitQueueSpace()	Returns amount of free space in transmit queue.

SWCReceiveQueueEmpty()	Tests for a receive queue empty condition.

SWCReceiveQueueFull()	Tests for a receive queue full condition.

SWCTransmitQueueEmpty()	Tests for a transmit queue empty condition.

SWCTransmitQueueFull()	Tests for a transmit queue full condition.

Receive Data Functions

These functions are used to remove characters from the receive queue.

SWCReceiveBuffer()	Receive multiple characters from the receive queue to a specified character buffer.

SWCReceiveCharacter()	Returns next character from receive queue.

SWCReceiveString()	Provides the capability for a remote user to input a string of characters with backspace editing.

SWCWaitForCharacter()	Waits a specified amount of time for a character.

SWCWaitReceiveCount()	Waits a specified amount of time for a count of characters.

Setup / Initialization

The setup / initialization group of functions are used to setup a communications port for use.  Also included in this section are the functions that close the communication port.

SWCCloseAllPorts()	Close all open communication ports owned by the current task the were opened by (SWCT).

SWCCloseCom()	Notifies Windows that this application will no longer be using a particular COM port.

SWCGetCommDeviceNumber()	Retrieves a numeric COM port number for an open port.

SWCGetNextOpenPort()	Search for the next open communications port that is owned by your application.

SWCGetOpenPortCount()	Returns the number of ports opened with the SilverWare Windows Communications Tool Kit by the current task.

SWCGetWindowsPortID()	Converts a SilverWare Windows Communications Tool Kit Port_ID value to the Windows idComDev value.

SWCIsPortOpen()	Checks to see if a Port_ID is a valid ID  for an open communications port owned by your application.

SWCOpenCom()	Notifies Windows that this application wants to begin using a particular COM port.

SWSGetMaximumCom()	Returns the maximum number of COM ports that your installed Windows driver can access.

Smartmodem Functions

This section contains the functions that are used to control the Smartmodem.

SWCSMAutoAnswer()	Set Smartmodem auto answer to answer on Nth ring.

SWCSMCommandEcho()	Controls whether the Smartmodem will echo data sent to it when in command state.

SWCSMDial()	Send number to dial to the Smartmodem.

SWCSMDialMode()	Sets the dialing method used by the Smartmodem.

SWCSMEscape()	Send escape code to Smartmodem.

SWCSMExtendedResult()	Control the Smartmodem result code set to be used.

SWCSMFullHalf()	Controls the duplex mode of the Smartmodem.

SWCSMGetModemResponse()	Get modem response from receive queue.

SWCSMHook()	Controls the Smartmodem telephone switch hook.

SWCSMQuiet()	Controls the quiet mode on the Smartmodem.

SWCSMReset()	Sends a reset command to the Smartmodem.

SWCSMSetDelayAfterCommand()	This will set the amount of time to pause after a (SWCSM Smart Modem) function is called.  The default is 1 second.

SWCSMSetEscGuardTime()	Set the amount of time to delay before and after the escape sequence (+++) is sent using SWCSMEscape().

SWCSMSetInterBytePacing()	Set Smart Modem Inter Byte Pacing delay time.

SWCSMSetRegister()	Set Smartmodem internal registers.

SWCSMSetSmartModemSuffix()	Set the suffix value for all (SWCSM) functions.

SWCSMSpeaker()	Control the external speaker on the Smartmodem.

SWCSMSpeedDial()	Control the speed of the Smartmodem touch-tone dialer.

SWCSMTransmit()	Send Smartmodem setup string.

SWCSMVerbose()	Enables/disables verbose mode of the Smartmodem.

Status / Control Functions

This group of functions are used to control the modem control outputs of the UART.

SWCControlDTR()	Controls the state of the DTR signal on the UART.

SWCControlRTS()	Controls the state of the RTS signal on the UART.

Transmit Data Functions

The transmit data functions are used to transmit data to the UART.

SWCTransmitBuffer()	Transmits a buffer of characters.

SWCTransmitCharacter()	Puts character into transmit queue.

SWCTransmitImmediate()	Transmits the character specified immediately.

SWCTransmitString()	Transmits NULL terminated string of characters.

UART Status / Control

This group of functions are used to control various operating aspects of the UART.

SWCGetBaudRate()	Retrieves the baud rate currently set in the UART.

SWCGetBreakInterrupt()	Returns the status of the Break Interrupt bit.

SWCGetCarrierDetect()	Returns the status of the Carrier Detect bit.

SWCGetClearToSend()	Returns the status of the Clear To Send bit.

SWCGetDataSetReady()	Returns the status of the Data Set Ready bit.

SWCGetFramingError()	Returns the status of the Framing Error bit.

SWCGetOverrunError()	Returns the status of the Overrun Error bit.

SWCGetParity()	Returns the current parity setting in the UART.

SWCGetParityError()	Returns the status of the Parity Error bit.

SWCGetRingIndicator()	Returns the status of the Ring Indicator bit.

SWCGetStopBits()	Returns number of stop bits set in the UART.

SWCGetWordLength()	Returns the word length value in the UART.

SWCSetBaudRate()	Sets the baud rate in the UART.

SWCSetParity()	Sets the parity in the UART.

SWCSetStopBits()	Sets the number of stop bits in the UART.

SWCSetUART()	Sets baud rate, parity, data bits and stop bits in the UART.

SWCSetWordLength()	Sets the word length value in the UART.

SWCTransmitBreak()	Enables or disables the transmission of a break signal.


System Functions

The system functions are provided to manipulate directories and do logical operations on variables.

SWSBitWiseAnd()	Returns a bitwise AND of two values.

SWSBitWiseOr()	Returns a bitwise OR of two values.

SWSGetHighByte()	Extracts upper order 8 bits (byte) from a 16 bit value.

SWSGetLowByte()	Extract low order 8 bits (byte) from the 16 bit value.

SWSIsDir()	Checks for presence of a directory.

SWSMakeDir()	Creates a directory.

SWSMakeWord()	Combine the HighByte value with the LowByte value creating and returning a 16 bit value.

SWSRemoveDir()	Removes a directory.

SWSRingBell()	Play a waveform sound corresponding to a given system alert level.


Timer Functions

The timer functions provide a variety of timing functions.  The range varies from simply returning the current seconds value to timers.

SWTCreateSystemTimer()	Creates a timer.

SWTDeleteAllTimers()	Deleate all active timers.

SWTDeleteSystemTimer()	Deleate a specific timer index.

SWTGetDOSSeconds()	Returns the seconds from DOS.

SWTGetSystemTickCount()	Return the current value of the system timer.

SWTGetTimer()	Current value of the timer specified.

SWTRestartTimer()	Restart an expired timer.

SWTResumeTimer()	Resume timer operation.

SWTStopTimer()	Stop a timer before the time has expired.

SWTWait()	Wait for a specified number of clock ticks.


What are programmers saying?

"The SilverWare Windows Communications Toolkit is the most Visual Basic-friendly of the DLL-based libraries . . ."  ". . . SilverWare provides the best trade-off between DLL power and Visual Basic usability."

Stuart R. Greenberg / VB  TECH  JOURNAL

"Your Windows Communications Tool Kit turns advanced serial communications into child's play..." "...I just called the functions and it worked the first time." "...using it with Visual Basic was a breeze..."

Bill McClenny, Ira B / Thayer Insurance Brokers

"I was highly impressed with how easy the SilverWare Windows Communication Tool Kit was to use with Clipper and FiveWin."

John Stolte / Omicron Software

"The quality and consistency has allowed me to migrate my applications from DOS to windows with little effort.  As a Delphi user, I appreciate the simplicity of incorporating Silverware's communications libraries into my applications."

Lowell Friedman / Can Do Software

"I got SilverWare's Library and in two days was able to get a small app communicating. It's a wonderful tool to use, and the support is impeccable."

George Lima / Coredata Inc.

"Silverware was the third communications package I purchased. All three packages made the same claims. Silverware was the only one that delivered.  The SilverWare Windows Communications Tool Kit worked with my language, right out of the box, and the support is incredible."

Ken Dickinson / Computer Solutions


Pricing and Availability
Give us a call!

To order your copy of the ultimate Windows communications tool kit contact SilverWare Inc. or one of the SilverWare Inc. dealers:

Address:	SilverWare Inc.

3010 LBJ Freeway  #740

Dallas. Tx

75234 (USA)

Telephone:	(214) 247-0131

Fax:	(214) 406-9999

BBS:	(214) 247-2177	300-19200/N/8/1

WWW:	http://rampages.onramp.net/~silver

Remember...

Price $299.00 USD...

No royalties...

Free technical support...

30 day money back guarantee...

MC / Visa / AMX or (COD Money Order)

Make your life a little easier and take advantage of the ultimate multi-language communications library for serious Windows developers.

Call Today!	SilverWare Inc. Dealers

Copyrights (c) and Trademarks


Additional SilverWare Products

SilverWare Inc. offers a host of programmer libraries for the DOS and Windows developers.  Below is a list of some of the products offered.

DOS products

SilverClip for Clipper	Communications Library for Clipper 5.xx programmers.

SilverFox (DOS)	Communications Library for FoxPro 2.xx programmers.

SilverComm Clipper/dBase (Dos)	Communications Library for Clipper 87, FoxBase, dBASE III/IV programmers.

SilverComm "C" Async Library	Communications Library for "C" programmers.

Windows Products

SilverFox Windows	Communications Library for FoxPro Windows 2.xx programmers.

Hardware

Multi COM I/O Boards

To order click here for SilverWare Inc. contact information.


Address and phone numbers
Give us a call!

You can contact us through the following:

Address:	SilverWare Inc.

3010 LBJ Freeway  #740

Dallas. Tx

75234 (USA)

Telephone:	(214) 247-0131

Fax:	(214) 406-9999

BBS:	(214) 247-2177	300-19200/N/8/1

WWW:	http://rampages.onramp.net/~silver


SilverWare Dealers
Dealers USA:

Programmers Paradise	(800) 445-7899

Programmers Shop	(800) 421-8006

Programmers Warehouse	(800) 323-1809

ZAC	(800) 254-7737

Dealers not in the USA:

A-TEK Systems (NSW)	61 23 872 544

Grey Matter Ltd. (England)	44 1 36 465 4100

PRO-LIB (Germany)	49 86 546 1212

QBS Software Ltd. (England)	44 1 81 994 4842


 FiveWin / Clip4Win programmers ONLY

This function has been renamed because of Clipper's 10 character limit on function names.  Make sure that you use the renamed function!


Multi COM I/O Boards

To access COM ports on multi I/O communications boards, first you must install your multi I/O COM card and the Microsoft Windows compatible COM driver supplied by the board manufacturer.  After installation, we recommend that you run the Windows Terminal Program in the Accessories program group to test the installed board and driver.  You can also configure COM ports from the Control Panel Ports option.  This will allow you to set the base I/O address and IRQ number for your communications ports.

You can also configure certain COM specific options in the [386enh] section of your Windows SYSTEM.INI file. (ie. COM1AutoAssign=number | seconds, COM1Base=address, COM1Buffer=number, COM1FIFO=ON/OFF, COM1Irq=number) We recommend that you review documentation on the [386enh] section before attempting to do any custom configurations.

The SilverWare Windows Communications Tool Kit support Multi COM I/O Boards including the Digi Board PC and MC 4,8 and 16 Intelligent and NON Intelligent.

SilverWare Inc. carries the full line of Digi Board products at discounted prices.  If you will be developing a Multi COM I/O application, call are sales or technical support department for information on the board that will best fit your needs.

The SilverWare Windows Communications Tool Kit will also support any multiport board that is supplied with a Microsoft Windows device driver.  Consult the multiport board manufacturers instructions for information on how to install the device driver.


Function Listing

Communications Functions

System Functions

Timer Functions


Copyrights (c) and Trademarks
Trademark Notice

SilverComm and SilverWare Windows Communications Tool Kit are trademarks of SilverWare Inc.  All other trademarks belong to their respected owners.  All rights reserved.  Printed in the United States of America.  This publication or any part of this publication may not be displayed, reproduced, stored in a retrieval system, transmitted in any form or by any means, electronic, mechanical photocopying, recording, or otherwise, or distributed to the public by sale, rental, lease, lending or any other transfer of ownership without the prior written permission of the publishers.  Nor may any derivative works based on the copyrighted work be prepared without express permission of the publishers.

SilverWare Inc. claims trademark rights in the following marks: SilverWare Inc., SilverWare Windows Communications Tool Kit and SilverComm.

All marks are trademarks and belong to their respected owners: Digital Equipment Corp, Hayes, Smartmodem, IBM.  All other trademarks belong to their respected owners.

Disclaimer

The authors have taken due care in the preparation of this document and the associated programs.  In no event will SilverWare Inc. be liable for damages of any kind, incidental or consequential, in regard to or arising out of the performance or form of the material presented herein and in the programs accompanying this document.  SilverWare Inc. makes NO WARRANTIES, EXPRESS or IMPLIED, concerning this software including, but not limited to, IMPLIED WARRANTIES of MERCHANTABILITY and/or FITNESS for any particular purpose.  Any source code included by SilverWare Inc. is meant solely as an example.  SilverWare Inc. does not warrant, guarantee or otherwise make any claim concerning the usability or functionality of the programs defined by the source code.  In no event will our liability for any damages to you or any other person ever exceed the retail price or user purchase price, whichever is less, of the license to use the software, regardless of any form of the claim.


Accept settings and exit this dialog.


Abort changes and exit this dialog.


Set baud rate defaults.  Grayed baud rates indicate baud

rates that are not supported by the installed COM driver.


All dialog defaults can be set with SWCT functions before the dialog is displayed.


Set desired hardware or software flow controls


Set desired Data Bits, Stop Bits and Parity.


Enter phone number to dial or pass it as a parameter to auto dial.


Dial phone number.


Hang-up (Disconnect) the modem.


Exit the auto dialer dialog.


Set the number of seconds to wait for a connection this is also passed as a parameter.


Set number of seconds to pause between calls this is also passed as a parameter.


Phone icon that goes on and off hook then changes to modem when a connection is made.


Show complete call status information during call.


Show call counter information.


Show modem response strings returned by the modem.


Select from a list of open COM ports.


Enable/disable ZMODEM crash recovery (resume).


Enable/disable CARRIER signal

monitoring during file transfers.


Set X/Y Modem CRC or Checksum

mode with auto fall back.


Enable/disable ZMODEM CRC-32 calculation.


Enable/disable file transfer status display box.


Set ASCII file transfer exit code. (ie. EOF marker)


Set ZMODEM time-out value.


Set X/Y/ZMODEM time value for the amount of time the display box will remain on the

screen after the transfer is complete.


Set ZMODEM packet size.

Set to 0 for streaming.


Set X\Y\ZMODEM retry value.


Set modem dialing command to pulse or tone.


Set modem internal defaults.


Choose a COM port to open.  Only ports available and not in use will be displayed.


Enable DTR/RTS signals when opening the port.


Set transmit/receive queue sizes when opening the port.


Select a directory.

Ideal for batch file transfer downloads.


Select a drive (supports CD drives).


Select a file.


Set file choices and extension filtering.


Set file read only filter.


Select file transfer direction.


Select file transfer type.


Pin 2, Transmit Data.


Pin 3, Receive Data.


Pin 4, Request To Send.


Pin 5, Clear To Send.


Pin 6, Data Set Ready.


Pin 7, Signal Ground.


Pin 8, Data Carrier Detect (CARRIER).


Pin 20, Data Terminal Ready.


Pins 2 and 3 are crossed (TD <-> RD).


Pins 4 and 5 are crossed (RTS <-> CTS).


Pins 7 and 7 are straight through ground.


Pins 6 is shorted to pin 20 (DSR <-> DTR).


Pins 8 and 20 are crossed (DCD <-> DSR).


Dummy